#ifndef _LEXICO_H_
#define _LEXICO_H_

#include "Token.h"

#include <iostream>
#include <string.h>
#include <fstream>
#include <list>

class Lexico
{
    public:

        Lexico();
        ~Lexico();

        void setFile(char *rFile);
        bool analisar();
        void exibirTokens(std::ostream& pSaida);

        int checkCaracter(char pCaracter);

        void createToken(char *pToken, Token pType, int pLinha);
        bool isFimComentario(char pCaracter);
        bool isFimComentario(char pCaracter1, char pCaracter2);
        bool isInicioComentario(char pCaracter);
        bool isInicioComentario(char pCaracter1, char pCaracter2);
        bool isSimboloComposto(char pCaracter1, char Caracter2);
        bool isPalavraReservada(char *pPalavra);
        bool isBooleano(char *pPalavra);
        bool isNumber(char caracter);
        bool isAlpha(char caracter);
        bool isSymbol(char caracter);
        
        std::list<TToken *> getTokens();

    private:

        std::list<TToken *> mTokens;
        std::ifstream       mFile;

        Type                type;

        std::list<char *>   mPalavrasReservadas;
		std::string         mAlphas;
		std::string         mNumbers;
		std::string         mSymbols;
};

#endif //_LEXICO_H_
